#include <bits/stdc++.h>
using namespace std;

int main()
{
    long long n, t;
    cin >> n >> t;
    string s;
    cin >> s;
    long long x = 1;
    while (x < n) x <<= 1;
    t %= x;
    for (int i = 0; i < t; i++)
    {
        for (int j = n - 1; j > 0; j--)
        {
            s[j] = (s[j] - '0') ^ (s[j - 1] - '0') + '0';
        }
    }
    cout << s;
    return 0;
}